<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>BMS</title>
    <script type="text/javascript" src="<s:url value="/js/reports/scorecard.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jquery_002.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jquery.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jqplot_004.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jqplot.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jqplot_002.js"/>"></script>

    <script type="text/javascript" src="<s:url value="/js/reports/jqplot.highlighter.min.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jqplot.cursor.min.js"/>"></script>
    <script type="text/javascript" src="<s:url value="/js/reports/jqplot.canvasAxisLabelRenderer.min.js"/>"></script>



    <style type="text/css">
        .jqplot-yaxis-label{
            left: -22px !important;
        }


    </style>

</head>
<body>



<script type="text/javascript">
    var $jq=jQuery.noConflict();
    $jq(document).ready(function(){
        build();
    });



</script>

<div id="filter">
    <s:form action="searchProtocols" cssClass="tableFilter">
       <tr>
           <th colspan="4" class="tableTitle">
               <h5>Scorecard Report</h5>
           </th>
       </tr>

       <s:select label="Countries"  id="countries"
                 headerKey="" headerValue="Choose a Countries"
                 list="countries"
                 listKey="id"
                 listValue="country"
                 name="country"
                 value="%{country}"
               >
       </s:select>

       <s:select label="Therapeutic Area"  id="therapeuticAreas"
                 headerKey="" headerValue="Choose a Therapeutic Area"
                 list="therapeuticAreas"
                 listKey="id"
                 listValue="name"
                 name="therapeuticArea"
                 value="%{therapeuticArea}"
               >
       </s:select>


       <tr>
           <td class="centeredButtons">
               <s:submit value="Search" name="filter" theme="simple" />
           </td>

       </tr>

    </s:form>






</div>
          <s:hidden id="data" name="data" value="%{data}" ></s:hidden>



<s:if test="!lista.isEmpty()">
<tr>
    <td>
        <TABLE id="table_content" width="350px" >

            <thead>

            <TR>
                <th style="width: 120px; white-space: nowrap;">Milestone</th>
                <th style="width: 90px; white-space: nowrap;">Average duration</th>
                <th style="width: 90px; white-space: nowrap;">Maximum duration</th>
                <th style="width: 90px; white-space: nowrap;">Minimum duration</th>
                <th style="width: 90px; white-space: nowrap;">Percentile 25</th>
                <th style="width: 50px; white-space: nowrap;">Percentile 75</th>

            </TR>
            </thead>
            <tbody>
            <s:iterator value="lista" var="protocolscorecard" status="row" >
                <tr>
                    <th style="width: 120px; white-space: nowrap;"><s:property value="%{milestone}"/> </th>
                    <th style="width: 120px; white-space: nowrap;"><s:property value="%{duration}"/> </th>
                    <th style="width: 120px; white-space: nowrap;"><s:property value="%{max}"/> </th>
                    <th style="width: 120px; white-space: nowrap;"><s:property value="%{min}"/> </th>
                    <th style="width: 120px; white-space: nowrap;"><s:property value="%{percentile25}"/> </th>
                    <th style="width: 120px; white-space: nowrap;"><s:property value="%{percentile75}"/> </th>

                </tr>
            </s:iterator>


            </tbody>
        </TABLE>

    </td>
</tr>
    <br/><br/>
   </s:if>

<div class="example-content">
    <div class="jqplot-target" id="chart1" style="height: 350px; width: 700px; position: relative;margin: 0 0 0 120px">
    </div>

</div>


<script type="text/javascript">
    $('#scorecard').css({"color":"#EE5102","fontWeight":"bold"});
</script>

</body>
</html>